import Taro from '@tarojs/taro'

const imageHttp = (options) => {
	return new Promise((resolve, reject) => {
		// let token=uni.getStorageSync('token');
		Taro.request({
			url: options.url,
			method: options.method || 'GET',
			data: options.data || {},
			header: {
				'content-type': 'application/json'
				// token
			},
			success: function(res) {
				resolve(res)
			},
			fail: function(err) {
				reject(err)
			}
		})
	})
}
export default imageHttp